//package cn.hznc.controller.fileupload;
//
//import cn.hznc.domain.response.ResponseBody;
//import cn.hznc.exception.SystemException;
//import cn.hznc.service.oss.OssService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
///**
// * @Author：Administrator
// * @Date：2023/3/28 14:59
// */
//@RestController
//@Slf4j
//@CrossOrigin(origins = "*", maxAge = 3600)
//@RequestMapping("/oss")
//public class OssController {
//
//    @Autowired
//    private OssService ossService;
//
//    @RequestMapping(value = "/upload" , method = RequestMethod.POST)
//    public ResponseBody upload(@RequestPart("file") MultipartFile file){
//        String url ="";
//        try{
//            url =  ossService.upload(file);
//        }catch (SystemException e){
//            log.error(System.currentTimeMillis()+"fileUpload error======>{}"+e.getMsg());
//            return ResponseBody.error(e.getCode() , e.getMsg());
//        }
//        return ResponseBody.success(url);
//    }
//}
